using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace WebAPI.domain
{
    public class BaseEntity
    {
        // 主键
        public Guid Id { get; set; }

        // 标识记录是否启用
        public bool IsActived { get; set; } = true;

        // 标识记录是否删除
        public bool IsDeleted { get; set; } = false;

        // 创建者的Id
        public Guid? CreatedBy { get; set; }

        // 修改者的Id
        public Guid? UpdatedBy { get; set; }

        // 创建时间
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
        public DateTime CreatedAt { get; set; } = DateTime.Now;

        // （最后）修改时间
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
        public DateTime UpdatedAt { get; set; } = DateTime.Now;

        // 展示的顺序
        public int DisplayOrder { get; set; }

        // 备注
        public string Remarks { get; set; } = "";
    }
}